unit ETask;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfmTask = class(TForm)
    Label1: TLabel;
    Button1: TButton;
    Edit1: TEdit;
    procedure FormActivate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmTask: TfmTask;

implementation

uses EMain;

{$R *.dfm}

procedure TfmTask.FormActivate(Sender: TObject);
begin
  fmMain.FindButtonQuick(TForm(sender).Handle);

  fmMain.pnAppBar.Parent := TForm(Sender);
  fmMain.pnAppTitle.Parent := TForm(Sender);
  //fmMain.lblShow.Caption:= TForm(Sender).Caption;

  TForm(Sender).Left:=fmMain.Left;
  TForm(Sender).Top:=fmMain.Top;
  TForm(Sender).Width :=fmMain.Width;
  TForm(Sender).Height:=fmMain.Height;  
end;

procedure TfmTask.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  fmMain.delete2sbwin(TForm(sender).Handle);
end;

procedure TfmTask.Button1Click(Sender: TObject);
begin
  close;
  //fmTask.Free;
  //fmTask:=nil;
end;

procedure TfmTask.FormShow(Sender: TObject);
begin
  fmMain.add2sbwin(TForm(sender).Handle,TForm(sender).caption,TForm(sender).name);
end;

end.
